<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html>
<head>
    <!-- 包含公共的JSP代码片段 -->
    <title>无线点餐平台</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script type="text/javascript" src="${pageContext.request.contextPath}/detail/style/js/jquery.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/detail/style/js/page_common.js"></script>
    <link href="${pageContext.request.contextPath}/detail/style/css/common_style_blue.css" rel="stylesheet" type="text/css">
    <link rel="${pageContext.request.contextPath}/detail/stylesheet" type="text/css" href="${pageContext.request.contextPath}/detail/style/css/index_1.css" />
</head>
<body>
<!-- 页面标题 -->
<div id="TitleArea">
    <div id="TitleArea_Head"></div>
    <div id="TitleArea_Title">
        <div id="TitleArea_Title_Content">
            <img border="0" width="13" height="13"
                 src="${pageContext.request.contextPath}/detail/style/images/title_arrow.gif" /> 用户列表
        </div>
    </div>
    <div id="TitleArea_End"></div>
</div>
<!-- 过滤条件 -->
<div id="QueryArea">
    <form action="../queryUser.action" method="post">
        <input type="hidden" name="method" value="search">
        <input type="text"  name="openId" title="请输入用户名称" value="${openId}">
        <input id="textkey" type="submit" value="搜索">
    </form>
</div>

<!-- 主内容区域（数据列表或表单显示） -->
<div id="MainArea">
    <table class="MainArea_Content" align="center" cellspacing="0" cellpadding="0">
        <!-- 表头-->
        <thead>
        <tr align="center" valign="middle" id="TableTitle">
            <td>用户编号</td>
            <td>用户微信编号</td>
            <td>用户状态</td>
            <td>操作</td>
        </tr>
        </thead>
        <!--显示数据列表 -->
        <tbody id="TableData">

        <c:if test="${lists==null || fn:length(lists) == 0}">
            <tr>
                <td colspan="4">还没有用户哦！</td>
            </tr>
        </c:if>
        <c:forEach items="${lists}" var="item" varStatus="status">
            <tr >
                <td class="center"><span class="center">${item.userId}</span></td>
                <td>${item.openId}</td>
                <td>${item.userState==0?'未注销':'注销'}</td>
                <td>
                    <a href="#" class="FunctionButton">更新</a>
                    <a href="../removeUser.action?rOpenId=${item.openId}" class="FunctionButton">删除</a>
                </td>
            </tr>
        </c:forEach>



        </tbody>
    </table>
    <!-- 其他功能超链接 -->
    <div id="TableTail">

        <div width="400px" align="center">
            <tr>
                <td colspan="6" align="center" bgcolor="#5BA8DE">共${page.totalRecords}条记录 共${page.totalPages}页 当前第${page.pageNo}页

                    <a href="../queryUser.action?pageNo=${page.topPageNo }&openId=${openId}"><input type="button" name="fristPage" value="首页" /></a>
                    <c:choose>
                        <c:when test="${page.pageNo!=1}">

                            <a href="../queryUser.action?pageNo=${page.previousPageNo }&openId=${openId}"><input type="button" name="previousPage" value="上一页" /></a>

                        </c:when>
                        <c:otherwise>

                            <input type="button" disabled="disabled" name="previousPage" value="上一页" />

                        </c:otherwise>
                    </c:choose>
                    <c:choose>
                        <c:when test="${page.pageNo != page.totalPages}">
                            <a href="../queryUser.action?pageNo=${page.nextPageNo}&openId=${openId}"><input type="button" name="nextPage" value="下一页" /></a>
                        </c:when>
                        <c:otherwise>

                            <input type="button" disabled="disabled" name="nextPage" value="下一页" />

                        </c:otherwise>
                    </c:choose>
                    <a href="../queryUser.action?pageNo=${page.bottomPageNo }&openId=${openId}"><input type="button" name="lastPage" value="尾页" /></a>
                </td>
            </tr>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">
</script>
</html>

